<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	tr.content{font-size: 12px;}
	tr.sub{font-size: 13px}
</style>
</head>
<body>
	<center>
	<br>
	<table border=0 width=700>
		<tr class=sub>
			<th width=50% align="left">직원 로그인 기록
			<th width=50% align="right">상세 검색
	</table>
	<form action="/ssteam/admin/logserch.do" method="post" id="LogDeptList">
	<table border=0 width=700>
		<tr valign="top" height="50">
			<td align="left"> 
				<select size="1" name="deptno">
					<option>&nbsp;&nbsp;전체 목록&nbsp;&nbsp;</option>
				<s:iterator value="dlist">
					<option value="${deptno }">${dname }</option>
				</s:iterator>
				</select>
				<s:a theme="ajax" targets="center1" formId="LogDeptList" showLoadingText="false">
					<img src="/ssteam/image/admin/go.gif" border="0" align="middle">
				</s:a>
		<tr class=sub>
			<td align="right">
	</table>
	</form>
	
	<table border=0 width=700 style="border-top: #5b8cd9 2pt solid;">
		<tr class="sub">
			<th width="25%">부서명
			<th width="20%">직원명
			<th width="20%">로그인 시각
			<th width="25%">로그인 IP
			<th width="10%">상태
		<s:iterator value="list">
		<tr class="content"  onmouseover="this.style.backgroundColor='#eaf0fa'"  onmouseout="this.style.backgroundColor=''">
			<td class="content">${dname }
			<td>${name }
			<td><fmt:formatDate value="${lgtime }" pattern="yyyy.MM.dd HH:mm:ss"/>
			<td>${lgip }
			<td>${status }
		</s:iterator>
		
			
		
		<tr>
			<td colspan="5">
		<hr color="#ededed">
		<tr>
			<td colspan=5>
				<font style="font-size: 13px">
				${curpage } page&nbsp;/ ${totalpage }pages
				</font>
				<br>
				
				<s:url action="logserch" namespace="/admin" id="prevPageURL">
					<s:param name="deptno" value="%{#request.deptno}"/>
					<s:param name="curpage">${curpage>1 ? curpage-1:curpage }</s:param>					
				</s:url>
				<s:url action="logserch" namespace="/admin" id="nextPageURL">
				<s:param name="deptno" value="%{#request.deptno}"/>
					<s:param name="curpage">${curpage<totalpage ? curpage+1: curpage}</s:param>					
				</s:url>
				
				<s:a href="%{prevPageURL}" theme="ajax" targets="center1" loadingText="  ">
					<font style="font-size: 12px">이전</font>
					</s:a> &nbsp;
				<s:a href="%{nextPageURL}" theme="ajax" targets="center1" loadingText="  ">
					<font style="font-size: 12px">다음</font>
				</s:a>
	</table>	
</center>
</body>
</html>